var TableInput = function () {
  var template = /* html */ `
    <el-input v-model="inputValue" :size="size" :disabled="disabled" :readonly="readonly" :clearable="clearable"
      @change="handleChange">
    </el-input>
  `;

  return {
    props: {
      value: {
        type: [String, Number],
        required: true
      },
      size: {
        type: String,
        default: 'mini'
      },
      disabled: Boolean,
      readonly: Boolean,
      clearable: {
        type: Boolean,
        default: false
      }
    },

    watch: {
      value: function () {
        if (this.changeValue !== null) {
          this.changeValue = null;
          return;
        }
        this.inputValue = this.value;
      }
    },

    data: function () {
      return {
        inputValue: this.value,
        changeValue: null
      };
    },

    methods: {
      handleChange: function () {
        var value = this.inputValue;
        this.changeValue = value;
        this.$emit('input', value);
      }
    },

    template: template
  };
}();
